﻿using Dapper;
using System;
using BCEntity.MySql.BusinessFlowStepInstance;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.MySql.BusinessFlowStepInstance
{
    /// <summary>
    /// OA系统业务流步骤实例
    /// </summary>
    public interface IBusinessFlowStepInstanceData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="businessFlowStepInstanceId">OA系统业务流步骤实例Id</param>
        Task<bool> Exists(long businessFlowStepInstanceId);
        /// <summary>
        /// 增加OA系统业务流步骤实例
        /// </summary>
        /// <param name="entities">OA系统业务流步骤实例信息列表</param>
        Task<bool> Add(List<BusinessFlowStepInstanceEntity> entities);
        /// <summary>
        /// 更新OA系统业务流步骤实例
        /// </summary>
        /// <param name="entity">OA系统业务流步骤实例信息</param>
        Task<BusinessFlowStepInstanceEntity> Update(BusinessFlowStepInstanceEntity entity);
        /// <summary>
        /// 删除OA系统业务流步骤实例
        /// </summary>
        /// <param name="businessFlowStepInstanceId">OA系统业务流步骤实例Id</param>
        Task<bool> Delete(long businessFlowStepInstanceId);
        /// <summary>
        /// 获取OA系统业务流步骤实例
        /// </summary>
        /// <param name="businessFlowStepInstanceId">OA系统业务流步骤实例Id</param>
        Task<BusinessFlowStepInstanceEntity> GetEntity(long businessFlowStepInstanceId);
        /// <summary>
        /// 获取OA系统业务流步骤实例列表
        /// </summary>
        /// <param name="businessFlowInstanceId">业务流实例Id</param>
        Task<IEnumerable<BusinessFlowStepInstanceEntity>> GetList(long businessFlowInstanceId);
        /// <summary>
        /// 获取OA系统业务流步骤实例分页列表
        /// </summary>
        /// <param name="businessFlowInstanceId">业务流实例Id</param>
        /// <param name="businessFlowModelId">业务流模型Id</param>
        /// <param name="pageBusinessConfigId">页面业务配置Id</param>
        /// <param name="businessFlowStepInstanceName">OA系统业务流步骤实例名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统业务流步骤实例每页数据条数</param>
        Task<(IEnumerable<BusinessFlowStepInstanceEntity>, int)> Query(long? businessFlowModelId, long? businessFlowInstanceId, long? pageBusinessConfigId,string businessFlowStepInstanceName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}